package com.papers.system.service;

import com.papers.common.core.domain.PageQuery;
import com.papers.common.core.domain.R;
import com.papers.common.core.page.TableDataInfo;
import com.papers.system.domain.bo.TJuanKnowledgeBo;
import com.papers.system.domain.dto.TJuanKnowledgeDragDto;
import com.papers.system.domain.dto.TJuanKnowledgeDto;
import com.papers.system.domain.vo.TJuanKnowledgeOutVo;
import com.papers.system.domain.vo.TJuanKnowledgePutVo;
import com.papers.system.domain.vo.TJuanKnowledgeVo;
import com.papers.system.domain.vo.TJuanLeftTreeVo;

import java.util.Collection;
import java.util.List;

/**
 * 知识点Service接口
 *
 * @author papers
 * @date 2022-10-08
 */
public interface ITJuanKnowledgeService {

    /**
     * 查询知识点树
     *
     * @return
     */
    List<TJuanLeftTreeVo> getKnowledgeTree(TJuanKnowledgeBo bo);

    /**
     * 查询侧边树
     */
    List<TJuanLeftTreeVo> getLeftTreeList();


    /**
     * 查询知识点
     */
    List<TJuanKnowledgeVo> getKnowledgeList(TJuanKnowledgeBo bo);

    /**
     * 查询知识点
     */
    TJuanKnowledgeVo queryById(String knowledgeId);

    /**
     * 查询知识点列表
     */
    TableDataInfo<TJuanKnowledgeVo> queryPageList(TJuanKnowledgeDto dto, PageQuery pageQuery);

    /**
     * 查询知识点列表
     */
    List<TJuanKnowledgeVo> queryList(TJuanKnowledgeBo bo);

    /**
     * 新增知识点
     */
    Boolean insertByBo(TJuanKnowledgeBo bo);

    /**
     * 修改知识点
     */
    Boolean updateByBo(TJuanKnowledgeBo bo);

    /**
     * 校验并批量删除知识点信息
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);


    List<TJuanKnowledgePutVo> OutputList(TJuanKnowledgeBo bo);

    R saveBatch(List<TJuanKnowledgeOutVo> list,String chapterId,String treeType);

    List<TJuanLeftTreeVo> getCourseTreeList(String majorId);

    R<Void> deleteKnowledge(String[] knowledgeIds);

    int KnowledgeCodeUnique(TJuanKnowledgeBo bo);

    boolean dragSort(TJuanKnowledgeDragDto dto);
}
